How I’ve been using the PC-BSD Ports Jail
So, when you install using ports, there is a lot of software you may not really want that gets installed. Are you familiar with the term build dependency. This is software, usually a library or scripting language, that is required for a software to compile from source, but is not needed at run time. When you always install from ports, your system will eventually have most or all the common build dependencies installed. Really the only dependencies you need are run-time dependencies. These dependencies make up the software that must be installed for the desired port to actually function.
Here is what I do:
- Install ports both in the jail and on my system pretty much at the same time with the same command, just in the different consoles.
# portsnap fetch update - Compile the port in the jail. This will build and install everything in the jail, including the build dependencies and run time dependencies and of course the port itself.
# cd /usr/ports/<group>/<port>
# make install - Sync the system’s ports tree with the jail’s ports tree using rsync.
# rsync -av /usr/jails/portjail/usr/ports/ /usr/ports - Install the port in the regular system. This only installs the run time dependencies and the port itself.
# cd /usr/ports/<group>/<port>
# make reinstall
This seems to work, and I don’t get all the build dependencies installed. Plus the rsync command is pretty quick.
I wonder if this is how the PC-BSD team uses it too?